package es.cazadoresmadridejos.beans.manager.reason.impl;

import java.util.List;

import org.displaytag.pagination.PaginatedList;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

import es.cazadoresmadridejos.beans.dao.reason.ReasonDao;
import es.cazadoresmadridejos.beans.manager.reason.ReasonManager;
import es.cazadoresmadridejos.common.bean.dao.Dao;
import es.cazadoresmadridejos.common.bean.manager.impl.ManagerImpl;
import es.cazadoresmadridejos.model.Reason;
import es.cazadoresmadridejos.objs.web.Page;

@Service
public class ReasonManagerImpl extends ManagerImpl<Reason> 
	implements ReasonManager{

	@Autowired 
	public void setDao(@Qualifier("reasonDao")
	Dao<Reason> dao) {
		this.dao = dao;
	}

	@Override
	public Reason getByReason(Long reasonFromDate) {
		return ((ReasonDao)dao).getByReason(reasonFromDate);
	}

	@Override
	public PaginatedList findAllPaginated(Page page) {
		return ((ReasonDao)dao).findAllPaginated(page);
	}

	@Override
	public List<Reason> findAllNotAssociated(Long budgetId) {
		return ((ReasonDao)dao).findAllNotAssociated(budgetId);
	}

}
